package ca.liu.study.springdata.jpa.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.data.rest.repository.annotation.RestResource;

import ca.liu.study.springdata.jpa.domain.Course;

public interface CourseRepository extends JpaRepository<Course, Long> {
	
	@RestResource(path = "name", rel = "names")
	public Course findByName(@Param("name") String name);
}
